
from evaluator.dify_rag_agent import DifyRagAgent
from evaluator.rag_test_desc import RagTestDesc
from evaluator.ragas_evaluator import RagasEvaluator


def run_test():
    test_agent = DifyRagAgent("http://10.221.114.53/v1/", "app-L8T3HfjZLgb4vMd9UC2SVNfa");
    test_descs = [
        RagTestDesc(
            question="恐龙是胎生的吗？",
            contexts=[],
            ground_truths = "是的"
        )
    ]
    
    result = RagasEvaluator().evaluate_agent(test_agent, test_descs)
    df = result.to_pandas()
    print(df)

if __name__ == '__main__':
    run_test()
